package school;

// 课程类：无继承关系，保留实验二原有属性与方法，仅调整package
public class Course {
    private int courseId;
    private String courseName;
    private String location;
    private String time;
    private Teacher teacher;
    private double credits;  // 实验二原有：学分属性

    // 实验二原有：构造方法（保留）
    public Course(int courseId, String courseName, String location, String time, double credits) {
        this.courseId = courseId;
        this.courseName = courseName;
        this.location = location;
        this.time = time;
        this.credits = credits;
        this.teacher = null;
    }

    // 实验二原有：Getter和Setter方法（保留）
    public int getCourseId() {
        return courseId;
    }

    public String getCourseName() {
        return courseName;
    }

    public String getLocation() {
        return location;
    }

    public String getTime() {
        return time;
    }

    public Teacher getTeacher() {
        return teacher;
    }

    public void setTeacher(Teacher teacher) {
        this.teacher = teacher;
    }

    public double getCredits() {
        return credits;
    }

    public void setCredits(double credits) {
        this.credits = credits;
    }
}